package com.Main;

import com.Algorithm.AHP;
import com.Algorithm.Promethee;
import com.Algorithm.Variant;
import com.DAO.DAO;
import com.Entity.Employee;

import java.util.List;

public class App 
{
    
    private DAO dao = new DAO();
    
    public void getAllPr(){
        
        List<Employee> employees = dao.getAllEmployees();
        /*
        Promethee p = new Promethee();
        p.buildModel(employees);
        List<Variant> rankingPromethee = p.determineRanking();
        
        AHP ahp = new AHP();
        ahp.buildModel(employees);
        List<Variant> rankingAHP = ahp.determineRanking();
                
        printRanking("\nPROMETHEE RANKING", rankingPromethee);
        printRanking("\nAHP RANKING", rankingAHP);
        */
    }
    
    public void printRanking(String ranking, List<Variant> variant)
    {
        System.out.println(ranking);
        
        for (Variant v : variant)
        {
            System.out.printf("%-30s %7.2f\n", 
                    v.getEmployee().getName() + " " + v.getEmployee().getSurname(), 
                    v.getValue());
        }
    }
    
    public static void main( String[] args )
    {
        App a = new App();
        
        a.getAllPr();
    }
}
